<template>
  <div class="home">
    <el-container class="elcontainer">
      <el-aside width="auto" class="elaside">
        <Common-aside></Common-aside>
      </el-aside>
      <el-main class="elmain">
        <keep-alive>
          <router-view></router-view>
        </keep-alive>    
      </el-main>
    </el-container>
  </div>
</template>

<script>
import CommonAside from "../components/CommonAside.vue";
export default {
  name: "Home",
  created() {
    // localStorage里面没有token就跳到登录页
    // if (!localStorage.getItem('token')) {
    //   this.$router.push("/login");
    // }
    
  },
  components: {
    CommonAside,
  },
};
</script>
<style lang="scss" scoped>
.home {
  width: 100%;
  height: 100%;
}
.elmain {
  padding: 0 !important;
  background-color: #F2F6FC;
}
.elcontainer {
  height: 100%;
}
.elaside {
  height: 100%;
}
.elheder {
  padding: 0;
}
</style>
